-
Notifications
You must be signed in to change notification settings - Fork 29
fix fs.fakeudev, do not source uevent file #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
what version of ugrd did you replicate the crash with? In older versions, it didn't check for the file before sourcing, and used the That looks reasonable, but I'm not sure why Using If you're using the stable release on gentoo, these bugs may still be present. Interestingly, the fakeudev module was created because systemd systems would fail, saying they could not find the root volume. Maybe something has changed so this is no longer necessary? |
ugrd 2.0.1. This machine has a fresh Gentoo install. ugrd generated a bootable image the first time. Then I ran a full world update, which updated ~170 packages, including systemd, and the crash started to appear. I believe both initramfs images were generated by ugrd 2.0.1 (
I can read from
It's ~amd64. |
thanks for the info, can you share the contents of that file at runtime? you can use the debug module (ugrd.base.debug) and check it manually that way. It's probably better to just parse the file like your patch does it anyways, im just interested in what may cause this file to not exist or be unsuitable for sourcing. |
|
this looks fine to me? I can also source it just fine with multiple shells. I wonder what the problem is? did you try manually sourcing it in the debug shell? |
I'd edited the Also the "Success" in the logs:
may suggest the sourcing itself succeeded but there was a side effect that caused the init to be killed (or something interpret that it was killed) |
im not sure why the behavior would differ? are you using a shell other than bash? Your method seems more compatible anyways, but I'd like to make a test case for this, for a case where your method works but mine does not. |
|
I discovered the crash only happens with bash 5.3. I downgraded bash to 5.2 (Gentoo's 5.2_p37-r3) and image boots fine. I recreated the image with a fresh build of bash 5.3 and it crashed again. |
Thanks for checking the shell version. I asked in #bash in libera and emanuele6 says there is a new check which compares the filesize listed to the contents, and uevent may show being larger than it actually is. Seems it may be a minor bug from added checks. In any case, your method looks more reliable and should get rid of the risks associated with sourcing stuff. Another user hit the same issue and your patch fixed it :D |
|
The only minor thing I'd adjust, is maybe it can use the check for the device mapper name as a check for attempting to log it. Maybe this is a decent check, because it could prevent it from adding entries where not necessary? I'm really not sure, if it's skipping from a lack of a name, maybe it could log a warning for that case? I think it would be fine if it simply used the name info for additional logging, and didn't fail to function if that info was missing. On that note, maybe it could log the found maj/minor at a debug level? Something like: |
My image throws a kernel panic:
The problem is sourcing the
ueventfile. I'm not exactly sure how it crashed the init but it doesn't seem we have to read from there.Also, I could disable
fake_dm_udev, by commenting the line ininitfile, and my systemd system booted just fine. Not sure if #181 was necessary.My setup:
I haven't changed default config and ugrd was able to detect LUKS and LVM automatically, great job :)